package com.itcpeng.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itcpeng.constant.MessageConstant;
import com.itcpeng.entity.Result;
import com.itcpeng.pojo.Member;
import com.itcpeng.service.InformationService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/information")
public class InformationController {

    @Reference
    private InformationService informationService ;

    @GetMapping(value = "/findTelephone")
    public Result findTelephone(String telephone) {
        Member list = informationService.findTelephone(telephone);
        return new Result(true, MessageConstant.GET_MEMBER_QUERY_SUCCESS, list);
    }
}
